global variable inside function